package ext.acae2.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;

public class MappingUtil {

	// attribute
	public static String OBJNAME;
	public static String DRAWINGNO;
	public static String COPYRIGHT;
	public static String CHARACTERTYPE;
	public static String MASS;
	public static String UNITE;
	public static String MODEL;
	public static String DESIGN;
	public static String SECRETLEVEL;
	public static String SECURITYDEADLINE;
	
	public static String PARTTYPE;
	public static String BLANKSPEC;
	public static String BLANKSTATE;
	public static String MATERIAL;
	public static String MATERIALSTANDARD;
	
	public static String TITLE;
	public static String DOCUMENTID;
	public static String DOCUMENTTYPE;
	
	public static String MUST;

	public static void execute(String path) throws IOException {

		Properties p = new Properties();
		FileInputStream inputStream = new FileInputStream(
				path);
		p.load(inputStream);

		// attribute
		OBJNAME = p.getProperty("OBJNAME");
		DRAWINGNO = p.getProperty("DRAWINGNO");
		COPYRIGHT = p.getProperty("COPYRIGHT");
		CHARACTERTYPE = p.getProperty("CHARACTERTYPE");
		MASS = p.getProperty("MASS");
		UNITE = p.getProperty("UNITE");
		MODEL = p.getProperty("MODEL");
		DESIGN = p.getProperty("DESIGN");
		SECRETLEVEL = p.getProperty("SECRETLEVE");
		SECURITYDEADLINE = p.getProperty("SECURITYDEADLINE");
		
		PARTTYPE = p.getProperty("PARTTYPE");
		BLANKSPEC = p.getProperty("BLANKSPEC");
		BLANKSTATE = p.getProperty("BLANKSTATE");
		MATERIAL = p.getProperty("MATERIAL");
		MATERIALSTANDARD = p.getProperty("MATERIALSTANDARD");
		
		TITLE = p.getProperty("TITLE");
		DOCUMENTID = p.getProperty("DOCUMENTID");
		DOCUMENTTYPE = p.getProperty("DOCUMENTTYPE");
		
		MUST = p.getProperty("MUST");
	}

}
